﻿using AutoMapper;
using Reporting.API.Application.Commands.InvoiceManagements;
using Reporting.API.Application.Commands.Productionorders;
using Reporting.API.Application.Commands.ProductionPlans;
using Reporting.API.Application.Commands.SaleOrders;
using Reporting.API.Application.Commands.Ticketmanagements;
using Reporting.API.DTOs.ProductionorderPlanDTO;
using Reporting.API.DTOs.ProductionPlanDTO;
using Reporting.Domain;

namespace Reporting.API
{
    public class MapingProfile : Profile
    {
        public MapingProfile()
        {
            //生产计划添加
            CreateMap<ProductionPlan, AddProductionPlanCommand>().ReverseMap();
            //生产计划修改
            CreateMap<ProductionPlan, UpdProductionPlanCommand>().ReverseMap();
            //生产计划下拉查询
            CreateMap<ProductionPlan, SelectCompleteProductionPlanResponse>().ReverseMap();


            //生产工单添加
            CreateMap<Productionorder, AddProductionorderCommand>().ReverseMap();
            //生产工单修改
            CreateMap<Productionorder, UpdateProductionorderCommand>().ReverseMap();
            //生产工单修改
            CreateMap<Productionorder, SelectProductionorderResponse>().ReverseMap();


            //添加 --开票
            CreateMap<InvoiceManagement, AddInvoiceManagementCommand>().ReverseMap();
            //修改 --开票
            CreateMap<InvoiceManagement, UpdateInvoiceManagementCommand>().ReverseMap();
          


            //添加 --到票
            CreateMap<Ticketmanagement, AddTicketmanagementCommand>().ReverseMap();
            //修改 --开票
            CreateMap<Ticketmanagement, UpdateTicketmanagementCommand>().ReverseMap();



            //添加 --销售订单
            CreateMap<SaleOrder, AddSaleOrderCommand>().ReverseMap();
            //修改 --销售订单
            CreateMap<SaleOrder, UpdateSaleOrderCommand>().ReverseMap();

        }
    }
}
